package com.isunland.managesystem.ui;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import com.isunland.managesystem.R;
import java.util.ArrayList;

/**
 * 对象功能:
 * 开发公司: 北京信普达系统工程有限公司
 * 开发人员: HuXiaoDan
 * 创建时间: 2017/7/11 14:35
 */
public class PicturePagerActivity extends SingleFragmentActivity {

  protected void onCreate(Bundle savedInstanceState) {
    //去掉状态栏
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
        WindowManager.LayoutParams.FLAG_FULLSCREEN);
    super.onCreate(savedInstanceState);
    View layout = findViewById(R.id.appbar);
    if (layout != null) layout.setVisibility(View.GONE);
  }

  @Override protected Fragment createFragment() {
    ArrayList<String> pics = getIntent().getStringArrayListExtra(PicturePagerFragment.EXTRA_PICS);
    int position = getIntent().getIntExtra(PicturePagerFragment.EXTRA_POSITION, 0);
    return PicturePagerFragment.newInstance(pics, position);
  }
}
